package com.hyperf.core.lock.executor;

/**
 * @author lizhaoyang
 */
public abstract class AbstractLockExecutor<T> implements LockExecutor<T> {

    /**
     * 获得锁实例
     *
     * @param locked       是否加锁成功
     * @param lockInstance 锁实例
     * @return
     */
    protected T obtainLockInstance(boolean locked, T lockInstance) {
        return locked ? lockInstance : null;
    }
}
